//package com.dshore.messagecenter.config;
//
//import javax.servlet.http.HttpServletRequest;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.cloud.context.scope.refresh.RefreshScope;
//import org.springframework.context.annotation.Configuration;
//
//import com.ctrip.framework.apollo.Config;
//import com.ctrip.framework.apollo.ConfigService;
//import com.ctrip.framework.apollo.model.ConfigChangeEvent;
//import com.ctrip.framework.apollo.spring.annotation.ApolloConfigChangeListener;
//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
//import com.dlxx.authMode.sso.SsoUserInfo;
//import com.dlxx.authMode.sso.UALoginConnector;
//
///**
// * 从apollo中读取配置信息
// * @author Administrator
// *
// */
//@Configuration
//@EnableApolloConfig({"application","dlxx.ualogin"})
//public class ConfigMgr {
//	@Autowired
//	private RefreshScope refreshScope;
//	
//	
//	@ApolloConfigChangeListener({"application","dlxx.ualogin"})
//	private void onChange(ConfigChangeEvent changeEvent) {
//		//参数发生变化时进行刷新
//		refreshScope.refreshAll();
//    }
//	
//	public void gettest() {
//		Config config = ConfigService.getAppConfig();
//		String str=config.getProperty("DESKEY", null);
//		System.out.println(str);
//	}
//	
//	public void getuser(HttpServletRequest request) {
//		SsoUserInfo user=UALoginConnector.getUserFromRequest(request);
//		System.out.println("000:");
//		System.out.println(user.getLoginName());
//	}
//
//}
